﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OUnsuitableProdAdd.aspx.cs" Inherits="IHISCETeim.Web.MachineSys.MacModel.OUnsuitableProdAdd" %>


    <style type="text/css">
        .OUnsuitableProdTable{ width:98%; border:2px solid #000; font-size:12px;  border-collapse:collapse;}
        .OUnsuitableProdTable td{ padding:2px; line-height:20px;border:1px dotted #000;}
        .OUnsuitableProdTable td.bold{ font-weight:bold;}
        .OUnsuitableProdTable tr.borderbottom td,.OUnsuitableProdTable td.borderbottom{ border-bottom:1px solid #000!important;}
        .OUnsuitableProdTable td.borderleft{border-left:1px solid #000!important;}
        .OUnsuitableProdTable input{width:98%; border-width:0px; border-bottom:1px solid #000; height:15px; line-height:15px; padding:2px; margin:0px; }
        .OUnsuitableProdTable textarea{width:98%; border:1px solid #000; padding:0px; margin:0px; }
    </style>
<div class="pageContent" style="">
 <form id="Form1" action="MacModel/OUnsuitableProdAdd.aspx?ajaxmethod=add" class="pageForm required-validate" onsubmit="return validateCallback(this,navTabAjaxDone);">
 <div class="pageFormContent" layoutH="56"> 
           
    <table class="OUnsuitableProdTable" >
        <tr>
            <td colspan="4" style=" text-align:center; font-size:18px; font-weight:bold;">
               不适合品处理票
            </td>
            <td style="font-size:9px; background-color:#ccc;"  width="70px">导出文件简称：</td>
            <td colspan="3" style="font-size:9px; background-color:#ccc;" >
                <input name="ExportFileName" class="text required" type="text"  />
            </td>
        </tr>
        <tr>
            <td style="width:60px">机种:</td>
            <td style="width:100px;"><input name="MacType" class="text required" type="text" /></td>
            <td style="width:70px">机器编号:</td>
            <td style="width:90px"><input name="SerialNumber" class="text " type="text" /></td>
            <td style="width:70px">发行日期:</td>
            <td style="width:90px"><input name="IssueDate" class="text date required" type="text" value="<%=DateTime.Now.ToString("yyyy-MM-dd") %>"   /></td>
            <td style="width:70px">票号(NO.):</td>
            <td style="width:70px"><input name="StampNo" class="text" readonly type="text" value="自动生成" /></td>
        </tr>
        <tr>
            <td> 图号:</td>
            <td colspan="3"><input name="ItemCode" class="text required" type="text" /></td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td rowspan="6" class="borderbottom">编制:</td>
            <td rowspan="6" class="borderbottom"><input name="Worker" class="text" type="text" value="<%=base.User.RealName %>" /></td>
        </tr>
        <tr>
            <td>名称:</td>
            <td colspan="3"><input name="ItemName" class="text" type="text" /></td>
            <td>数量:</td>
            <td><input name="Quantity" class="text required number" type="text" value=""/></td>
        </tr>
        <tr>
            <td>供应商:</td>
            <td colspan="3"><input name="SupplerName" id="OUnsuitableProdAdd_SupplerName" class="text autocomplete required" type="text"  autocompletehref="<%=AutoCompleteRequestUrl %>?ajaxmethod=getsupplierlist" swidth="300"/></td>
            <td>重复发生:</td>
            <td><input name="IsMultiplicity" type="checkbox" value="true" /></td>
        </tr>
        <tr>
            <td>零件号:</td>
            <td colspan="3"><input name="PartNum" class="text" type="text" /></td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td>发现场所:</td>
            <td>生产车间 </td>
            <td><input name="FindPrdWorkShop" type="checkbox" value="true" /></td>
            <td>仓库</td>
            <td><input name="FindWarehouse" type="checkbox" value="true" /></td>
            <td>&nbsp;</td>
        </tr>
        <tr class="borderbottom">
            <td>ERP</td>
            <td>已入库</td>
            <td><input name="ERPFinished" type="checkbox" value="true" /></td>
            <td>未入库</td>
            <td><input name="ERPNotFinished" type="checkbox" value="true" /></td>
            <td> &nbsp;</td>
        </tr>
        <tr>
            <td colspan="4" class="bold">不适合现象描述:</td>
            <td colspan="4" class="bold borderleft" >图片说明:</td>
        </tr>
        <tr>
            <td colspan="4" rowspan="2">
                <textarea name="UnsuitableDescribe" style="height:45px;"></textarea>
            </td>
            <td rowspan="2" class="borderleft"  width="70px">
                <IMG width="70px" height="45px" src="" title="图片1" id="AddOUnsuitableProdUpLoad_Img_1" />
            </td>
            <td  width="70px">上传图片:</td>
            <td colspan="2">
                <input name="filedata" type="file" id="AddOUnsuitableProdUpLoad1"  uploadify="uploadify" onUploadSuccess="onAddOUnsuitableProdUpLoadUploadSuccess" fileTypeDesc= 'Image Files' fileTypeExts= '*.gif; *.jpg; *.png,*.bmp,*jpeg'/>
	
                <input name="IMGAbsolutePath" type="hidden" />
                <input name="IMGRelatively" type="hidden" />
            </td>
        </tr>
        <tr>
            <td> 图片1说明:</td>
            <td colspan="2"><input name="Title" type="text" /></td>
        </tr>
        <tr>
            <td colspan="4" class="bold">原因分析(零件品质状况,确认结果):</td>
            <td rowspan="2" class="borderleft">
                <IMG width="70px" height="45px" src="" alt="图2" />
            </td>
            <td>上传图片:</td>
            <td colspan="2">
                <input name="filedata" type="file" id="AddOUnsuitableProdUpLoad2" uploadify="uploadify" onUploadSuccess="onAddOUnsuitableProdUpLoadUploadSuccess" fileTypeDesc= 'Image Files' fileTypeExts= '*.gif; *.jpg; *.png,*.bmp,*jpeg'/>
                <input name="IMGAbsolutePath" type="hidden" />
                <input name="IMGRelatively" type="hidden" />
            </td>
        </tr>
        <tr>
            <td colspan="4" rowspan="3">
                <textarea name="AnalysisCause"  style="height:70px;"></textarea>
            </td>
            <td>图片2说明:</td>
            <td colspan="2">
                <input name="Title" type="text" />
            </td>
        </tr>
        <tr>
            <td rowspan="2" class="borderleft">
                <IMG width="70px" height="45px" src="" alt="图3" />
            </td>
            <td>上传图片:</td>
            <td colspan="2">
                <input name="filedata" type="file" id="AddOUnsuitableProdUpLoad3" uploadify="uploadify" onUploadSuccess="onAddOUnsuitableProdUpLoadUploadSuccess" fileTypeDesc= 'Image Files' fileTypeExts= '*.gif; *.jpg; *.png,*.bmp,*jpeg'/>
                <input name="IMGAbsolutePath" type="hidden" />
                <input name="IMGRelatively" type="hidden" />
            </td>
        </tr>
        <tr>
            <td>图片3说明:</td>
            <td colspan="2">
                <input name="Title" type="text" /></td>
        </tr>
        <tr>
            <td colspan="4" class="bold">对策措施(临时对策及永久对策):</td>
            <td rowspan="2" class="borderleft">
                <IMG width="70px" height="45px" src="" alt="图4" />
            </td>
            <td>上传图片:</td>
            <td colspan="2"> 
                <input name="filedata" type="file"  id="AddOUnsuitableProdUpLoad4" uploadify="uploadify" onUploadSuccess="onAddOUnsuitableProdUpLoadUploadSuccess" fileTypeDesc= 'Image Files' fileTypeExts= '*.gif; *.jpg; *.png,*.bmp,*jpeg'/>
                <input name="IMGAbsolutePath" type="hidden" />
                <input name="IMGRelatively" type="hidden" />
            </td>
        </tr>
        <tr>
            <td colspan="4" rowspan="2">
                <textarea name="Countermeasure"  style="height:45px;"></textarea>
            </td>
            <td>图片4说明:</td>
            <td colspan="2"> 
                <input name="Title" type="text" /></td>
        </tr>
        <tr>
            <td rowspan="2" class="borderleft">
                <IMG width="70px" height="45px" src="" alt="图5" />
            </td>
            <td>上传图片:</td>
            <td colspan="2">
                <input name="filedata" type="file" id="AddOUnsuitableProdUpLoad5" uploadify="uploadify" onUploadSuccess="onAddOUnsuitableProdUpLoadUploadSuccess" fileTypeDesc= 'Image Files' fileTypeExts= '*.gif; *.jpg; *.png,*.bmp,*jpeg'/>
                <input name="IMGAbsolutePath" type="hidden" />
                <input name="IMGRelatively" type="hidden" />
            </td>
        </tr>
        <tr>
            <td colspan="4" class="bold">效果确认(供应商回复):</td>
            <td>图片5说明:</td>
            <td colspan="2"><input name="Title" type="text" /></td>
        </tr>
        <tr>
            <td colspan="4" rowspan="2">
                <textarea name="Verification"  style="height:45px;"></textarea>    
            </td>
            <td rowspan="2" class="borderleft">
                <IMG width="70px" height="45px" src="" alt="图46" />
            </td>
            <td>上传图片:</td>
            <td colspan="2">
                <input name="filedata" type="file" id="AddOUnsuitableProdUpLoad6" uploadify="uploadify" onUploadSuccess="onAddOUnsuitableProdUpLoadUploadSuccess" fileTypeDesc= 'Image Files' fileTypeExts= '*.gif; *.jpg; *.png,*.bmp,*jpeg'/>
                <input name="IMGAbsolutePath" type="hidden" />
                <input name="IMGRelatively" type="hidden" />
            </td>
        </tr>
        <tr>
            <td>图片6说明:</td>
            <td colspan="2">
                <input name="Title" type="text" /></td>
        </tr>
    </table>
    <table class="OUnsuitableProdTable">
        <tr>
            <td>&nbsp;</td>
            <td style="width:55px" rowspan="2">质管部门<br/>处理意见</td>
            <td style="width:55px">退货返修</td>
            <td style="width:30px"><input name="NotionReturn" type="checkbox" value="true" /></td>
            <td style="width:55px">厂内翻修</td>
            <td style="width:30px"><input name="NotionOverhaul" type="checkbox" value="true" /></td>
            <td style="width:55px">特殊采用</td>
            <td style="width:30px"><input name="NotionSpecial" type="checkbox" value="true" /></td>
            <td style="width:30px">报废</td>
            <td style="width:30px"><input name="NotionScrap" type="checkbox" value="true" /></td>
            <td style="width:40px" rowspan="2" ><label ><input name="NotionEnter" type="checkbox" value="true" style=" width:30px!important;" />有无附属件</label> </td>
            <td style="width:40px"  rowspan="2"><label ><input name="NotionCanRepair" type="checkbox" value="true" style=" width:30px!important;"/>能否返回维修</label></td>
            <td style="width:95px">防止再发对策书</td>
            <td style="width:20px">要</td>
            <td style="width:20px"><input name="NotionBookYes" type="checkbox" value="true" /></td>
            <td style="width:20px">否</td>
            <td align="left"><input name="NotionBookNo" type="checkbox" value="true" style=" width:30px!important;" /></td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td>数量</td>
            <td><input name="NotionReturnNum" type="text"  value="0"/></td>
            <td>数量</td>
            <td><input name="NotionOverhaulNum" type="text" value="0"/></td>
            <td>数量</td>
            <td><input name="NotionSpecialNum" type="text" value="0"/></td>
            <td>数量</td>
            <td><input name="NotionScrapNum" type="text" value="0"/></td>
            
            <td>要求回答日期</td>
            <td colspan="4"><input name="AnswerDate"  type="text" /></td>
        </tr>
        <tr>
            <td rowspan="5" style=" text-align:center;width:20px;">
            损失费用
            </td>
            <td >调查费用</td>
            <td><input name="LoseSurveyUnit" id="OUPA_LoseSurveyUnit" type="text" value="0" /></td>
            <td>Hｒ×</td>
            <td colspan="2"><input name="LoseSurveyPrice" id="OUPA_LoseSurveyPrice" type="text" value="80" /></td>
            <td>元=</td>
            <td colspan="2"><input name="LoseSurveySubtotal" id="OUPA_LoseSurveySubtotal" type="text" value="0" /></td>
            <td>元</td>
            <td colspan="2">补偿金额合计</td>
            <td>供应商认可</td>
            <td colspan="4">责任判定</td>
        </tr>
        <tr>
            <td><input name="LoseModifyTitle" type="text" value="修正费用" /></td>
            <td><input name="LoseModifyUnit" id="OUPA_LoseModifyUnit" type="text" value="0" /></td>
            <td>Hｒ×</td>
            <td colspan="2"><input name="LoseModifyPrice" id="OUPA_LoseModifyPrice" type="text" value="80" /></td>
            <td>元=</td>
            <td colspan="2"><input name="LoseModifySubtotal" id="OUPA_LoseModifySubtotal" type="text" value="0" /></td>
            <td>元</td>
            <td colspan="2" rowspan="2"><input name="LoseTotal" id="OUPA_LoseTotal" type="text" value="0" /></td>
            <td rowspan="3"><input name="LoseSuppler" type="text" value="0" /></td>
            <td colspan="4" rowspan="3"><input id="OUnsuitableProdAdd_LoseCtrDpt" name="LoseCtrDpt" type="text" value="" /></td>
        </tr>
        <tr>
            <td>材料费</td>
            <td colspan="7"><input name="LoseMaterialsTotal" id="OUPA_LoseMaterialsTotal" type="text" value="0" /></td>
            <td>元</td>
        </tr>
        <tr>
            <td>保存费</td>
            <td><input name="LoseSaveUnit"  id="OUPA_LoseSaveUnit"  type="text" value="0" /></td>
            <td>天 ×</td>
            <td colspan="2"><input name="LoseSavePrice" id="OUPA_LoseSavePrice" type="text" value="100" /></td>
            <td>元=</td>
            <td colspan="2"><input name="LoseSaveSubtotal" id="OUPA_LoseSaveSubtotal" type="text" value="0" /></td>
            <td>元</td>            
            <td colspan="2">(不含税)</td>
        </tr>
        <tr>
            <td>其它费用</td>
            <td colspan="7" ><input name="LoseDelaySubtotal" id="OUPA_LoseDelaySubtotal" type="text" value="0" /></td>
            <%--<td>Hｒ×</td>
            <td colspan="2"><input name="LoseDelayPrice" id="OUPA_LoseDelayPrice" type="text" value="100" /></td>
            <td>元=</td>
            <td colspan="2"><input name="LoseDelaySubtotal" id="OUPA_LoseDelaySubtotal" type="text" value="0" /></td>--%>
            <td>元</td>
            <td colspan="7">提醒：对无对策又重复发生不良事项将严格追回所有损失</td>
        </tr>
        <tr>
            <td colspan="17">提醒：不良品限时退回，外地供应商限时3个月，本地供应商限时1个月，超时，将按到付的方式寄回供应商处或自行处理</td>
        </tr>
    </table>
    <hr style="width:100%; border:1px dotted #000; " />
    <div>
        注：必需填写物料号才会被记录系统。
    </div>
    <table class="OUnsuitableProdTable OUPT_ADD_TABLE_DETAIL">
        <tr>
            <td colspan="11" style=" text-align:center; font-weight:bold; font-size:14px;">不良品返回原材料入库单</td>
        </tr>
        <tr>
            <td style="width:20px">1</td>
            <td style="width:80px">
                物料号:
                <input name="DetailType"  type="hidden" value="返回"/>
            </td>
            <td style="width:100px"><input name="DItemCode" toShowId="OUPA_DItemCode1" type="text" /></td>
            <td style="width:80px">名称:</td>
            <td style="width:100px"><input name="DItemName" toShowId="OUPA_DItemName1" type="text" /></td>
            <td style="width:80px">数量:</td>
            <td style="width:100px"><input name="DQuantity" class="number" toShowId="OUPA_DQuantity1" type="text"  value="0"/></td>
            <td style="width:80px">退货返修:</td>
            <td style="width:100px">
                <input name="IsReturned" type="hidden" value="false" />
                <input type="checkbox" class="checkbox" forcheck="IsReturned" />
                <input name="IsDefectivePrd" type="hidden" value="false" />
            </td>
            <td style="width:80px">报废处理:</td>
            <td>
                 <input name="IsScrap" type="hidden" value="false" />
                 <input type="checkbox" class="checkbox"  forcheck="IsScrap" />
            </td>
        </tr>
        <tr>
            <td style="width:20px">2</td>
            <td style="width:80px">
                物料号:
                <input name="DetailType" type="hidden" value="返回"/>
            </td>
           <td style="width:100px"><input name="DItemCode" toShowId="OUPA_DItemCode2" type="text" /></td>
            <td style="width:80px">名称:</td>
            <td style="width:100px"><input name="DItemName" toShowId="OUPA_DItemName2" type="text" /></td>
            <td style="width:80px">数量:</td>
            <td style="width:100px"><input name="DQuantity" class="number" toShowId="OUPA_DQuantity2" type="text"  value="0"/></td>
            <td style="width:80px">退货返修:</td>
            <td style="width:100px">
                <input name="IsReturned" type="hidden" value="false" />
                <input type="checkbox" class="checkbox" forcheck="IsReturned" />
                <input name="IsDefectivePrd" type="hidden" value="false" />
            </td>
            <td style="width:80px">报废处理:</td>
            <td>
                 <input name="IsScrap" type="hidden" value="false" />
                 <input type="checkbox" class="checkbox"  forcheck="IsScrap" />
            </td>
        </tr>
        <tr>
            <td style="width:20px">3&nbsp;</td>
            <td style="width:80px">
                物料号:
                <input name="DetailType" type="hidden" value="返回"/>
            </td>
            <td style="width:100px"><input name="DItemCode" toShowId="OUPA_DItemCode3" type="text" /></td>
            <td style="width:80px">名称:</td>
            <td style="width:100px"><input name="DItemName" toShowId="OUPA_DItemName3" type="text" /></td>
            <td style="width:80px">数量:</td>
            <td style="width:100px"><input name="DQuantity" class="number" toShowId="OUPA_DQuantity3" type="text"  value="0"/></td>
            <td style="width:80px">退货返修:</td>
            <td style="width:100px">
                <input name="IsReturned" type="hidden" value="false" />
                <input type="checkbox" class="checkbox" forcheck="IsReturned" />
                <input name="IsDefectivePrd" type="hidden" value="false" />
            </td>
            <td style="width:80px">报废处理:</td>
            <td>
                 <input name="IsScrap" type="hidden" value="false" />
                 <input type="checkbox" class="checkbox"  forcheck="IsScrap" />
            </td>
        </tr>
        <tr>
            <td style="width:20px">4</td>
            <td style="width:80px">
                物料号:
                <input name="DetailType" type="hidden" value="返回"/>
            </td>
            <td style="width:100px"><input name="DItemCode" toShowId="OUPA_DItemCode4" type="text" /></td>
            <td style="width:80px">名称:</td>
            <td style="width:100px"><input name="DItemName" toShowId="OUPA_DItemName4" type="text" /></td>
            <td style="width:80px">数量:</td>
            <td style="width:100px"><input name="DQuantity" class="number" toShowId="OUPA_DQuantity4" type="text"  value="0"/></td>
            <td style="width:80px">退货返修:</td>
            <td style="width:100px">
                <input name="IsReturned" type="hidden" value="false" />
                <input type="checkbox" class="checkbox" forcheck="IsReturned" />
                <input name="IsDefectivePrd" type="hidden" value="false" />
            </td>
            <td style="width:80px">报废处理:</td>
            <td>
                 <input name="IsScrap" type="hidden" value="false" />
                 <input type="checkbox" class="checkbox"  forcheck="IsScrap" />
            </td>
        </tr>
        <tr>
            <td style="width:20px">5</td>
            <td style="width:80px">
                物料号:
                <input name="DetailType" type="hidden" value="返回"/>
            </td>
              <td style="width:100px"><input name="DItemCode" toShowId="OUPA_DItemCode5" type="text" /></td>
            <td style="width:80px">名称:</td>
            <td style="width:100px"><input name="DItemName" toShowId="OUPA_DItemName5" type="text" /></td>
            <td style="width:80px">数量:</td>
            <td style="width:100px"><input name="DQuantity" class="number" toShowId="OUPA_DQuantity5" type="text"  value="0"/></td>
            <td style="width:80px">退货返修:</td>
            <td style="width:100px">
                <input name="IsReturned" type="hidden" value="false" />
                <input type="checkbox" class="checkbox" forcheck="IsReturned" />
                <input name="IsDefectivePrd" type="hidden" value="false" />
            </td>
            <td style="width:80px">报废处理:</td>
            <td>
                 <input name="IsScrap" type="hidden" value="false" />
                 <input type="checkbox" class="checkbox"  forcheck="IsScrap" />
            </td>
        </tr>
        <tr>
            <td style="width:20px">6</td>
            <td style="width:80px">
                物料号:
                <input name="DetailType" type="hidden" value="返回"/>
            </td>
              <td style="width:100px"><input name="DItemCode" toShowId="OUPA_DItemCode6" type="text" /></td>
            <td style="width:80px">名称:</td>
            <td style="width:100px"><input name="DItemName" toShowId="OUPA_DItemName6" type="text" /></td>
            <td style="width:80px">数量:</td>
            <td style="width:100px"><input name="DQuantity" class="number" toShowId="OUPA_DQuantity6" type="text"  value="0"/></td>
            <td style="width:80px">退货返修:</td>
            <td style="width:100px">
                <input name="IsReturned" type="hidden" value="false" />
                <input type="checkbox" class="checkbox" forcheck="IsReturned" />
                <input name="IsDefectivePrd" type="hidden" value="false" />
            </td>
            <td style="width:80px">报废处理:</td>
            <td>
                 <input name="IsScrap" type="hidden" value="false" />
                 <input type="checkbox" class="checkbox"  forcheck="IsScrap" />
            </td>
        </tr>
        <tr>
            <td style="width:20px">7&nbsp;</td>
            <td style="width:80px">
                物料号:
                <input name="DetailType" type="hidden" value="返回"/>
            </td>
              <td style="width:100px"><input name="DItemCode" toShowId="OUPA_DItemCode7" type="text" /></td>
            <td style="width:80px">名称:</td>
            <td style="width:100px"><input name="DItemName" toShowId="OUPA_DItemName7" type="text" /></td>
            <td style="width:80px">数量:</td>
            <td style="width:100px"><input name="DQuantity" class="number" toShowId="OUPA_DQuantity7" type="text"  value="0"/></td>
            <td style="width:80px">退货返修:</td>
            <td style="width:100px">
                <input name="IsReturned" type="hidden" value="false" />
                <input type="checkbox" class="checkbox" forcheck="IsReturned" />
                <input name="IsDefectivePrd" type="hidden" value="false" />
            </td>
            <td style="width:80px">报废处理:</td>
            <td>
                 <input name="IsScrap" type="hidden" value="false" />
                 <input type="checkbox" class="checkbox"  forcheck="IsScrap" />
            </td>
        </tr>
        <tr>
            <td style="width:20px">8</td>
            <td style="width:80px">
                物料号:
                <input name="DetailType" type="hidden" value="返回"/>
            </td>
             <td style="width:100px"><input name="DItemCode" toShowId="OUPA_DItemCode8" type="text" /></td>
            <td style="width:80px">名称:</td>
            <td style="width:100px"><input name="DItemName" toShowId="OUPA_DItemName8" type="text" /></td>
            <td style="width:80px">数量:</td>
            <td style="width:100px"><input name="DQuantity" class="number" toShowId="OUPA_DQuantity8" type="text"  value="0"/></td>
            <td style="width:80px">退货返修:</td>
            <td style="width:100px">
                <input name="IsReturned" type="hidden" value="false" />
                <input type="checkbox" class="checkbox" forcheck="IsReturned" />
                <input name="IsDefectivePrd" type="hidden" value="false" />
            </td>
            <td style="width:80px">报废处理:</td>
            <td>
                 <input name="IsScrap" type="hidden" value="false" />
                 <input type="checkbox" class="checkbox"  forcheck="IsScrap" />
            </td>
        </tr>
        <tr>
            <td style="width:20px">9</td>
            <td style="width:80px">
                物料号:
                <input name="DetailType" type="hidden" value="返回"/>
            </td>
             <td style="width:100px"><input name="DItemCode" toShowId="OUPA_DItemCode9" type="text" /></td>
            <td style="width:80px">名称:</td>
            <td style="width:100px"><input name="DItemName" toShowId="OUPA_DItemName9" type="text" /></td>
            <td style="width:80px">数量:</td>
            <td style="width:100px"><input name="DQuantity" class="number" toShowId="OUPA_DQuantity9" type="text"  value="0"/></td>
            <td style="width:80px">退货返修:</td>
            <td style="width:100px">
                <input name="IsReturned" type="hidden" value="false" />
                <input type="checkbox" class="checkbox" forcheck="IsReturned" />
                <input name="IsDefectivePrd" type="hidden" value="false" />
            </td>
            <td style="width:80px">报废处理:</td>
            <td>
                 <input name="IsScrap" type="hidden" value="false" />
                 <input type="checkbox" class="checkbox"  forcheck="IsScrap" />
            </td>
        </tr>
        <tr>
            <td style="width:20px">10</td>
            <td style="width:80px">
                物料号:
                <input name="DetailType" type="hidden" value="返回"/>
            </td>
              <td style="width:100px"><input name="DItemCode" toShowId="OUPA_DItemCode10" type="text" /></td>
            <td style="width:80px">名称:</td>
            <td style="width:100px"><input name="DItemName" toShowId="OUPA_DItemName10" type="text" /></td>
            <td style="width:80px">数量:</td>
            <td style="width:100px"><input name="DQuantity" class="number" toShowId="OUPA_DQuantity10" type="text"  value="0"/></td>
            <td style="width:80px">退货返修:</td>
            <td style="width:100px">
                <input name="IsReturned" type="hidden" value="false" />
                <input type="checkbox" class="checkbox" forcheck="IsReturned" />
                <input name="IsDefectivePrd" type="hidden" value="false" />
            </td>
            <td style="width:80px">报废处理:</td>
            <td>
                 <input name="IsScrap" type="hidden" value="false" />
                 <input type="checkbox" class="checkbox"  forcheck="IsScrap" />
            </td>
        </tr>
    </table>

    <hr style="width:100%; border:1px dotted #000; " />
     <div>
        注：必需填写物料号才会被记录系统。
    </div>
    <table class="OUnsuitableProdTable">
        <tr>
            <td colspan="11" style=" text-align:center; font-weight:bold; font-size:14px;">不良品/报废原材料出库单</td>
        </tr>
        <tr>
            <td style="width:20px">1</td>
            <td  style="width:80px">
            物料号:
            <input name="DetailType" type="hidden" value="报废"/>
            </td>
            <td  style="width:100px"><input name="DItemCode" id="OUPA_DItemCode1" type="text" /></td>
            <td  style="width:80px">名称:</td>
            <td style="width:100px"><input name="DItemName" id="OUPA_DItemName1" type="text" /></td>
            <td  style="width:80px">数量:</td>
            <td style="width:100px"><input name="DQuantity" class="number" id="OUPA_DQuantity1" type="text"  value="0"/></td>
            <td  style="width:80px">不良品转库:</td>
            <td style="width:100px">
                <input name="IsReturned" type="hidden" value="false" />
                <input name="IsDefectivePrd" type="hidden" value="false" />
                <input type="checkbox"  class="checkbox" forcheck="IsDefectivePrd"/>
            </td>
            <td  style="width:80px">报废处理:</td>
            <td>
                <input name="IsScrap" type="hidden" value="false" />
                <input type="checkbox" class="checkbox" forcheck="IsScrap"/>
            </td>
        </tr>
        <tr>
            <td style="width:20px">2&nbsp;</td>
            <td  style="width:80px">
            物料号:
            <input name="DetailType" type="hidden" value="报废"/>
            </td>
            <td  style="width:100px"><input name="DItemCode" id="OUPA_DItemCode2" type="text" /></td>
            <td  style="width:80px">名称:</td>
            <td style="width:100px"><input name="DItemName" id="OUPA_DItemName2" type="text" /></td>
            <td  style="width:80px">数量:</td>
            <td style="width:100px"><input name="DQuantity" class="number" id="OUPA_DQuantity2" type="text"  value="0"/></td>
            <td  style="width:80px">不良品转库:</td>
            <td style="width:100px">
                <input name="IsReturned" type="hidden" value="false" />
                <input name="IsDefectivePrd" type="hidden" value="false" />
                <input type="checkbox"  class="checkbox" forcheck="IsDefectivePrd"/>
            </td>
            <td  style="width:80px">报废处理:</td>
            <td>
                <input name="IsScrap" type="hidden" value="false" />
                <input type="checkbox" class="checkbox" forcheck="IsScrap"/>
            </td>
        </tr>
        <tr>
            <td style="width:20px">3</td>
            <td  style="width:80px">
            物料号:
            <input name="DetailType" type="hidden" value="报废"/>
            </td>
            <td  style="width:100px"><input name="DItemCode"  id="OUPA_DItemCode3" type="text" /></td>
            <td  style="width:80px">名称:</td>
            <td style="width:100px"><input name="DItemName"  id="OUPA_DItemName3" type="text" /></td>
            <td  style="width:80px">数量:</td>
            <td style="width:100px"><input name="DQuantity" class="number" type="text" id="OUPA_DQuantity3"  value="0"/></td>
            <td  style="width:80px">不良品转库:</td>
            <td style="width:100px">
                <input name="IsReturned" type="hidden" value="false" />
                <input name="IsDefectivePrd" type="hidden" value="false" />
                <input type="checkbox"  class="checkbox" forcheck="IsDefectivePrd"/>
            </td>
            <td  style="width:80px">报废处理:</td>
            <td>
                <input name="IsScrap" type="hidden" value="false" />
                <input type="checkbox" class="checkbox" forcheck="IsScrap"/>
            </td>
        </tr>
        <tr>
            <td style="width:20px">4</td>
           <td  style="width:80px">
            物料号:
            <input name="DetailType" type="hidden" value="报废"/>
            </td>
            <td  style="width:100px"><input name="DItemCode" id="OUPA_DItemCode4" type="text" /></td>
            <td  style="width:80px">名称:</td>
            <td style="width:100px"><input name="DItemName" type="text" id="OUPA_DItemName4"/></td>
            <td  style="width:80px">数量:</td>
            <td style="width:100px"><input name="DQuantity" class="number" type="text"  id="OUPA_DQuantity4" value="0"/></td>
            <td  style="width:80px">不良品转库:</td>
            <td style="width:100px">
                <input name="IsReturned" type="hidden" value="false" />
                <input name="IsDefectivePrd" type="hidden" value="false" />
                <input type="checkbox"  class="checkbox" forcheck="IsDefectivePrd"/>
            </td>
            <td  style="width:80px">报废处理:</td>
            <td>
                <input name="IsScrap" type="hidden" value="false" />
                <input type="checkbox" class="checkbox" forcheck="IsScrap"/>
            </td>
        </tr>
        <tr>
            <td style="width:20px">5</td>
            <td  style="width:80px">
            物料号:
            <input name="DetailType" type="hidden" value="报废"/>
            </td>
            <td  style="width:100px"><input name="DItemCode" type="text" id="OUPA_DItemCode5"/></td>
            <td  style="width:80px">名称:</td>
            <td style="width:100px"><input name="DItemName" type="text"  id="OUPA_DItemName5"/></td>
            <td  style="width:80px">数量:</td>
            <td style="width:100px"><input name="DQuantity" class="number" type="text"  value="0" id="OUPA_DQuantity5"/></td>
            <td  style="width:80px">不良品转库:</td>
            <td style="width:100px">
                <input name="IsReturned" type="hidden" value="false" />
                <input name="IsDefectivePrd" type="hidden" value="false" />
                <input type="checkbox"  class="checkbox" forcheck="IsDefectivePrd"/>
            </td>
            <td  style="width:80px">报废处理:</td>
            <td>
                <input name="IsScrap" type="hidden" value="false" />
                <input type="checkbox" class="checkbox" forcheck="IsScrap"/>
            </td>
        </tr>
        <tr>
            <td style="width:20px">6</td>
            <td  style="width:80px">
            物料号:
            <input name="DetailType" type="hidden" value="报废"/>
            </td>
            <td  style="width:100px"><input name="DItemCode" type="text" id="OUPA_DItemCode6"/></td>
            <td  style="width:80px">名称:</td>
            <td style="width:100px"><input name="DItemName" type="text" id="OUPA_DItemName6"/></td>
            <td  style="width:80px">数量:</td>
            <td style="width:100px"><input name="DQuantity" class="number" type="text"  value="0" id="OUPA_DQuantity6"/></td>
            <td  style="width:80px">不良品转库:</td>
            <td style="width:100px">
                <input name="IsReturned" type="hidden" value="false" />
                <input name="IsDefectivePrd" type="hidden" value="false" />
                <input type="checkbox"  class="checkbox" forcheck="IsDefectivePrd"/>
            </td>
            <td  style="width:80px">报废处理:</td>
            <td>
                <input name="IsScrap" type="hidden" value="false" />
                <input type="checkbox" class="checkbox" forcheck="IsScrap"/>
            </td>
        </tr>
        <tr>
            <td style="width:20px">7</td>
            <td  style="width:80px">
            物料号:
            <input name="DetailType" type="hidden" value="报废"/>
            </td>
            <td  style="width:100px"><input name="DItemCode" type="text" id="OUPA_DItemCode7"/></td>
            <td  style="width:80px">名称:</td>
            <td style="width:100px"><input name="DItemName" type="text" id="OUPA_DItemName7"/></td>
            <td  style="width:80px">数量:</td>
            <td style="width:100px"><input name="DQuantity" class="number" type="text"  value="0" id="OUPA_DQuantity7"/></td>
            <td  style="width:80px">不良品转库:</td>
            <td style="width:100px">
                <input name="IsReturned" type="hidden" value="false" />
                <input name="IsDefectivePrd" type="hidden" value="false" />
                <input type="checkbox"  class="checkbox" forcheck="IsDefectivePrd"/>
            </td>
            <td  style="width:80px">报废处理:</td>
            <td>
                <input name="IsScrap" type="hidden" value="false" />
                <input type="checkbox" class="checkbox" forcheck="IsScrap"/>
            </td>
        </tr>
        <tr>
            <td style="width:20px">8</td>
            <td  style="width:80px">
            物料号:
            <input name="DetailType" type="hidden" value="报废"/>
            </td>
            <td  style="width:100px"><input name="DItemCode" type="text" id="OUPA_DItemCode8"/></td>
            <td  style="width:80px">名称:</td>
            <td style="width:100px"><input name="DItemName" type="text" id="OUPA_DItemName8"/></td>
            <td  style="width:80px">数量:</td>
            <td style="width:100px"><input name="DQuantity" class="number" type="text"  value="0" id="OUPA_DQuantity8"/></td>
            <td  style="width:80px">不良品转库:</td>
            <td style="width:100px">
                <input name="IsReturned" type="hidden" value="false" />
                <input name="IsDefectivePrd" type="hidden" value="false" />
                <input type="checkbox"  class="checkbox" forcheck="IsDefectivePrd"/>
            </td>
            <td  style="width:80px">报废处理:</td>
            <td>
                <input name="IsScrap" type="hidden" value="false" />
                <input type="checkbox" class="checkbox" forcheck="IsScrap"/>
            </td>
        </tr>
        <tr>
            <td style="width:20px">9</td>
           <td  style="width:80px">
            物料号:
            <input name="DetailType" type="hidden" value="报废"/>
            </td>
            <td  style="width:100px"><input name="DItemCode" type="text" id="OUPA_DItemCode9"/></td>
            <td  style="width:80px">名称:</td>
            <td style="width:100px"><input name="DItemName" type="text" id="OUPA_DItemName9"/></td>
            <td  style="width:80px">数量:</td>
            <td style="width:100px"><input name="DQuantity" class="number" type="text"  value="0" id="OUPA_DQuantity9"/></td>
            <td  style="width:80px">不良品转库:</td>
            <td style="width:100px">
                <input name="IsReturned" type="hidden" value="false" />
                <input name="IsDefectivePrd" type="hidden" value="false" />
                <input type="checkbox"  class="checkbox" forcheck="IsDefectivePrd"/>
            </td>
            <td  style="width:80px">报废处理:</td>
            <td>
                <input name="IsScrap" type="hidden" value="false" />
                <input type="checkbox" class="checkbox" forcheck="IsScrap"/>
            </td>
        </tr>
        <tr>
            <td style="width:20px">10</td>
           <td  style="width:80px">
            物料号:
            <input name="DetailType" type="hidden" value="报废"/>
            </td>
            <td  style="width:100px"><input name="DItemCode" type="text" id="OUPA_DItemCode10"/></td>
            <td  style="width:80px">名称:</td>
            <td style="width:100px"><input name="DItemName" type="text" id="OUPA_DItemName10"/></td>
            <td  style="width:80px">数量:</td>
            <td style="width:100px"><input name="DQuantity" class="number" type="text"  value="0" id="OUPA_DQuantity10"/></td>
            <td  style="width:80px">不良品转库:</td>
            <td style="width:100px">
                <input name="IsReturned" type="hidden" value="false" />
                <input name="IsDefectivePrd" type="hidden" value="false" />
                <input type="checkbox"  class="checkbox" forcheck="IsDefectivePrd"/>
            </td>
            <td  style="width:80px">报废处理:</td>
            <td>
                <input name="IsScrap" type="hidden" value="false" />
                <input type="checkbox" class="checkbox" forcheck="IsScrap"/>
            </td>
        </tr>
    </table>
   
    <script type="text/javascript">
            function onAddOUnsuitableProdUpLoadUploadSuccess(file, data, response) {
                if (!response)
                    return false;
                var restults = data.split("|");
                var $imgUploadPath = restults[0];
                var $trageId = restults[1];
              
                var $IMGAbsolutePath = $("#" + $trageId).closest("td").find(":hidden[name='IMGAbsolutePath']"); //图片实际路际
                var $IMGRelatively = $("#" + $trageId).closest("td").find(":hidden[name='IMGRelatively']"); //图片相对路际
                var $img = $("#" + $trageId).closest("tr").find("IMG");
                $img.attr("src", $imgUploadPath);
                $IMGAbsolutePath.val("E:/WEB/IHISCE" + $imgUploadPath);
                $IMGRelatively.val($imgUploadPath);
            }
        $(function () {
           
            $(".OUnsuitableProdTable").find(".checkbox").change(function () {
                $ck = $(this).closest("td").find(":hidden[name='" + $(this).attr("forcheck") + "']");
                // alert($(this).attr("forcheck"));
                //alert($(this).attr("checked"));
                $ck.val($(this).attr("checked"));
            })

            $("#OUnsuitableProdAdd_SupplerName").blur(function () {
                $("#OUnsuitableProdAdd_LoseCtrDpt").val($(this).val());
            })
            //金额自动统计
            //调查费用
            $("#OUPA_LoseSurveyUnit,#OUPA_LoseSurveyPrice").change(function () {
                var $LoseSurveyUnit = parseFloat($("#OUPA_LoseSurveyUnit").val());
                var $LoseSurveyPrice = parseFloat($("#OUPA_LoseSurveyPrice").val());
                $("#OUPA_LoseSurveySubtotal").val($LoseSurveyUnit * $LoseSurveyPrice);
                changeLoseTotal();
            })
            //修正费用
            $("#OUPA_LoseModifyUnit,#OUPA_LoseModifyPrice").change(function () {
                var $LoseModifyUnit = parseFloat($("#OUPA_LoseModifyUnit").val());
                var $LoseModifyPrice = parseFloat($("#OUPA_LoseModifyPrice").val());
                $("#OUPA_LoseModifySubtotal").val($LoseModifyUnit * $LoseModifyPrice);
                changeLoseTotal();
            });

            //延误费用-->其它费用,  材料费
            $("#OUPA_LoseSurveySubtotal,#OUPA_LoseModifySubtotal,#OUPA_LoseSaveSubtotal,#OUPA_LoseMaterialsTotal,#OUPA_LoseDelaySubtotal").change(function () {
                // var $LoseDelayUnit = parseFloat($("#OUPA_LoseDelayUnit").val());
                // var $LoseDelayPrice = parseFloat($("#OUPA_LoseDelayPrice").val());
                //$("#OUPA_LoseDelaySubtotal").val($LoseDelayUnit * $LoseDelayPrice);
                changeLoseTotal();
            });
            //保存费
            $("#OUPA_LoseSaveUnit,#OUPA_LoseSavePrice").change(function () {
                var $LoseSaveUnit = parseFloat($("#OUPA_LoseSaveUnit").val());
                var $LoseSavePrice = parseFloat($("#OUPA_LoseSavePrice").val());
                $("#OUPA_LoseSaveSubtotal").val($LoseSaveUnit * $LoseSavePrice);
                changeLoseTotal();
            })

            //--
            $("table.OUPT_ADD_TABLE_DETAIL").find(":text").change(function () {
                var $showid = $(this).attr("toShowId");
                $("#" + $showid).val($(this).val());
            })
        });
        function changeLoseTotal() {
            var $LoseTotal = parseFloat($("#OUPA_LoseSurveySubtotal").val()) + parseFloat($("#OUPA_LoseModifySubtotal").val()) + parseFloat($("#OUPA_LoseSaveSubtotal").val());

            parseFloat($("#OUPA_LoseMaterialsTotal").val()) + parseFloat($("#OUPA_LoseDelaySubtotal").val())
            var $temp = parseFloat($("#OUPA_LoseMaterialsTotal").val())
            if (isNaN($temp))
                $temp = 0
            $LoseTotal = $LoseTotal + $temp;

            $temp = parseFloat($("#OUPA_LoseDelaySubtotal").val())
            if (isNaN($temp))
                $temp = 0
            $LoseTotal = $LoseTotal + $temp;

            $("#OUPA_LoseTotal").val($LoseTotal);
        }
    </script>
</div>
<div class="formBar">
   <ul>
				<li><div class="buttonActive"><div class="buttonContent">                 
                    <button type="submit">保存</button></div></div></li>
				<li><div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div></li>
			</ul>
		</div>
       
</form>
</div> 
